package com.hmall.search.service.impl;

import com.hmall.common.dto.PageDTO;
import com.hmall.common.dto.SearchParams;
import com.hmall.common.dto.SearchVo;
import com.hmall.feign.client.ItemClient;
import com.hmall.search.service.SearchService;
import com.hmall.utils.UserThreadLocal;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * TODO
 *
 * @Author lyh
 * @Date 2024/11/13 20:45
 */
@Component
public class SearchServiceImpl implements SearchService {
    @Autowired
    private ItemClient itemClient;
    @Override
    public SearchVo filters(SearchParams searchParams) {
        return itemClient.fliters(searchParams);
    }

    @Override
    public PageDTO list(SearchParams searchParams) {
        System.out.println("userId:"+UserThreadLocal.getSubject());
        return itemClient.list(searchParams);
    }
}
